#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""  
@Project : pythonProject
@File : select.py
@Author : 万能小魏
@Time : 2024/8/16 14:32  
@脚本说明 : 

"""
import woniu.dataList as dataList
def selectAll():
    for user in dataList.userList:
        print(
            f"ID: {user['id']}, 账号: {user['username']}, 邮箱: {user['email']}, 性别: {user['gender']}, 注册时间: {user['register']}, 年龄: {user['age']}, 状态: {user['status']}")
def selectById():
    selectID = input("请输出您要查询的ID:\n")
    tempList = list(filter(lambda u: u['id'] == selectID, dataList.userList))
    if len(tempList) == 0:
        print("未查询到该ID!")
    else:
        print(
            f"ID: {tempList[0]['id']}, 账号: {tempList[0]['username']}, 邮箱: {tempList[0]['email']}, 性别: {tempList[0]['gender']}, 注册时间: {tempList[0]['register']}, 年龄: {tempList[0]['age']}, 状态: {tempList[0]['status']}")
